import { defineStore } from 'pinia'

// 用于跨页面临时保存当前要编辑/新增的提醒数据，避免通过 URL 传参泄漏
export const useReminderEditStore = defineStore('reminderEdit', {
  state: () => ({
    data: null // { id,title,time,repeatType,nextTrigger,baseDate,description }
  }),
  actions: {
    set(reminder) { this.data = reminder ? { ...reminder } : null },
    clear() { this.data = null }
  }
})
